get default message processing functions
'
'
' ***** Initialize ****
'
SUB Initialize
XuiGetDefaultMessageFunctions (@func[])
XgrMessageNameToNumber (@"LastMessage", @upperMessage)

The Initialize subroutine first gets a copy of the default message processing functions in func[] , and finds the highest message number, which it will soon need.

The default message processing functions give a grid basic, straightforward functionality by routing common messages to standard message processing functions that handle the messages in an obvious, direct, expected way. For example, XuiSetColor() is the standard message processing function for message SetColor , and it sets any combination of background, drawing, lowlight, highlight colors for the grid (a -1 argument means leave unchanged).

establish message functions
func[#Callback] = &XuiCallback()
func[#GetSmallestSize] = 0
func[#Resize] = 0

Three message processing functions are changed from the default values established by XuiGetDefaultMessageFunctions() :

func[#Callback] = &XuiCallback sets the message processing function for Callback messages to &XuiCallback() . This is normal practice for "visual only grids" - those without internal functionality. Whenever this function receives a Callback message, XuiCallback() sends the message back to whatever function set itself as the callback function for the XuiDialog2B grid whose kid produced the Callback message. When GuiDesigner creates grid functions, it inserts this line of code. To give a visual grid type functionality, remove this line, enable the sub[#Callback] = SUBADDRESS (Callback) line a few lines below, and add code to the Selection and/or any other relevant callback message processing subroutines (most callback messages are Selection messages).

func[#GetSmallestSize]=0 cancels default message processing function XuiGetSmallestSize() for message GetSmallestSize . XuiGetSmallestSize() returns the original design size because minWidth ,maxWidth ,minHeight ,maxHeight properties are set to the designWidth,designHeight.  This fixes the size of the grid, while XuiDialog2B is supposed to be resizable.  An internal GetSmallestSize subroutine replaces the message function.

func[#Resize] = 0 cancels the default message processing function XuiResizeNot() for message Resize . XuiResizeNot() does not resize grids and is therefore designed for fixed-size "non-resizable" grids, while XuiDialog2B is resizable. An internal Resize subroutine replaces the message function.